package cn.sdack.go.users.dao;

import cn.sdack.go.common.entities.users.RoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author sdack
 * @date 2024/1/8
 */
public interface RoleDao extends JpaRepository<RoleEntity,Long>, JpaSpecificationExecutor<RoleEntity>  {

    Long countByDelIsNull();

    RoleEntity findByGidAndCode(long gid,String key);

    RoleEntity findByGidAndCodeAndDelIsNull(long gid,String key);

    List<RoleEntity> findAllByGidAndCodeIn(long gid,List<String> keys);
}
